#include <stdio.h>
#include <stdlib.h>

#if 0

# 转换格式化输出，带有堆栈检查
int __sprintf_chk(char * str, int flag, size_t strlen, const char * format);

#endif


int main()
{
    char buffer[1024] = {0};

    __sprintf_chk(buffer, 1, -1, "%s/%d/stat", "/proc", 1);
    printf("buffer=%s\n", buffer);   // /proc/1/stat

    return 0;
}
